public class EventLogsManagerController
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
EventLogsManagerController.DefaultInternalFrameAdapter
This inner class extends
InternalFrameAdapter for creating a
specific adapter for the JInternalFrame frames. |
private class |
EventLogsManagerController.FooterAreaButtonActionListener
This inner class implements
ActionListener for overriding the
actionPerformed(ActionEvent)
method and creating a specific listener to use on the
FooterAreaButton buttons. |
private class |
EventLogsManagerController.MainFrameKeyEventDispatcher
This inner class implements
KeyEventDispatcher to realise
a specific key event dispatcher to give to the KeyboardFocusManager
of the main JFrame . |
private class |
EventLogsManagerController.MainFrameWindowAdapter
This inner class extends
WindowAdapter for creating
a specific adapter for the main JFrame . |
private class |
EventLogsManagerController.MenuAreaButtonActionListener
This inner class implements
ActionListener for overriding the
actionPerformed(ActionEvent)
method and creating a specific listener to use on the JButton buttons of the
menuArea . |
private class |
EventLogsManagerController.PopupMenuItemActionListener
This inner class implements
ActionListener for overriding the
actionPerformed(ActionEvent)
method and creating a specific listener to use on the JMenuItem
items of the JPopupMenu pop-up added to an
FooterAreaButton button. |
Modifier and Type | Field and Description |
---|---|
private AnalysisManager |
analysisManager
The
AnalysisManager used by the Controller to manage all the operations
associated with the MenuAreaButton buttons that are inside the
Discovery Tab . |
private EventLogsManagerController.DefaultInternalFrameAdapter |
defaultInternalFrameAdapter
This adapter, instance of the inner class
DefaultInternalFrameAdapter ,
will be the listener for all the JInternalFrame frames created. |
private EditorManager |
editorManager
The
EditorManager used by the Controller to manage all the operations
associated with the MenuAreaButton buttons that are inside the
File Tab . |
private EventLogsManagerModel |
elmModel
The
EventLogManagerModel element
that represents the Model of the application. |
private EventLogsManagerView |
elmView
The
EventLogManagerView element
that represents the View of the application. |
private EventLogsManagerController.FooterAreaButtonActionListener |
footerAreaButtonActionListener
This listener, instance of the inner class
FooterAreaButtonActionListener ,
will be the listener for all the
FooterAreaButton buttons. |
private EventLogsManagerController.PopupMenuItemActionListener |
popupMenuItemActionListener
This listener, instance of the inner class
PopupMenuItemActionListener ,
will be the listener for all the JMenuItem items that are
inside the JPopupMenu pop-up menus associated to the
FooterAreaButton buttons. |
Constructor and Description |
---|
EventLogsManagerController(EventLogsManagerView elmView,
EventLogsManagerModel elmModel)
Constructs a new
EventLogMangerController , with the View and
the Model to manage. |
Modifier and Type | Method and Description |
---|---|
private boolean |
closeEventLog(javax.swing.JInternalFrame internalFrame)
Closes the
JInternalFrame passed as parameter, if one is passed,
or the selected one inside the
contentArea ,
if a frame is set as selected. |
private void |
createEventLogFootprint() |
private boolean |
exportEventLog()
It uses the
EditorManager
exportEventLog()
method. |
FooterAreaButton |
findFooterAreaButton(javax.swing.JInternalFrame target)
Searches for the associated
FooterAreaButton button of the target
JInternalFrame , returning it or null otherwise. |
javax.swing.JInternalFrame |
findJInternalFrame(java.lang.String targetID)
Searches for the target
JInternalFrame inside the
contentArea
using its title, returning it or null otherwise. |
AnalysisManager |
getAnalysisManager()
This method returns the
AnalysisManager analysisManager element. |
EditorManager |
getEditorManager()
This method returns the
EditorManager editorManager element. |
EventLogsManagerModel |
getModel()
This method returns the
EventLogsManagerModel elmModel element. |
EventLogsManagerView |
getView()
This method returns the
EventLogsManagerView elmView element. |
void |
modifyJInternalFrameTitles(javax.swing.JInternalFrame targetInternalFrame,
java.lang.String newTitle)
Sets the title of the target internal frame as the
newTitle passed as parameter
and then updates all its references in the associated FooterAreaButton to keep
the integrity and the association between them. |
private void |
newEventLog()
Opens a dialog to ask the user to decide between an empty Event Log or
a wizard for a guided creation of an Event Log, using the
EditorManager
newEventLog() method. |
void |
newEventLogEditor(java.lang.String editorTitle,
java.lang.String editorContent,
java.lang.String associatedFilePath,
boolean isModified)
Adds a new
EventLogEditor internal frame inside the
contentArea ,
then adds a new FooterAreaButton button inside the
footerArea ,
both with the same title. |
void |
newInternalFrame(java.lang.String frameTitle,
java.awt.Component frameContent)
Adds a new
JInternalFrame object inside the
contentArea ,
then adds a new FooterAreaButton button inside the
footerArea ,
both with the same title. |
private void |
openEventLog(java.lang.String selectedFileName)
Asks the
EditorManager to open an "Open" dialog to ask the user to select
which file to open and then to try to open it, using the
openEventLog(String)
method. |
private boolean |
saveAsEventLog(java.lang.String selectedFileName)
Opens a "Save As" dialog to ask the user decide where to save the content of
the selected
EventLogEditor editor inside the
contentArea ,
then it tries to save the content in the selected file. |
private boolean |
saveEventLog()
Saves the content of the selected
EventLogEditor editor inside the
contentArea
in its own file, if an editor is selected. |
private void |
setStandardListeners()
Adds to the standard components of the View the respective listeners
|
private boolean |
validateEventLog()
Validates the content of the selected
EventLogEditor editor inside the
contentArea ,
checking if its content respects the XES Schema and therefore is a valid XES document. |
private EventLogsManagerView elmView
EventLogManagerView
element
that represents the View of the application.EventLogsManagerView
private EventLogsManagerModel elmModel
EventLogManagerModel
element
that represents the Model of the application.EventLogsManagerModel
private EventLogsManagerController.DefaultInternalFrameAdapter defaultInternalFrameAdapter
DefaultInternalFrameAdapter
,
will be the listener for all the JInternalFrame
frames created.JInternalFrame
private EventLogsManagerController.FooterAreaButtonActionListener footerAreaButtonActionListener
FooterAreaButtonActionListener
,
will be the listener for all the
FooterAreaButton
buttons.private EventLogsManagerController.PopupMenuItemActionListener popupMenuItemActionListener
PopupMenuItemActionListener
,
will be the listener for all the JMenuItem
items that are
inside the JPopupMenu
pop-up menus associated to the
FooterAreaButton
buttons.JMenuItem
,
JPopupMenu
private EditorManager editorManager
EditorManager
used by the Controller to manage all the operations
associated with the MenuAreaButton
buttons that are inside the
File Tab
.private AnalysisManager analysisManager
AnalysisManager
used by the Controller to manage all the operations
associated with the MenuAreaButton
buttons that are inside the
Discovery Tab
.public EventLogsManagerController(EventLogsManagerView elmView, EventLogsManagerModel elmModel)
EventLogMangerController
, with the View and
the Model to manage.
The constructor then initialises and adds to the View components the
respective listeners using the setStandardListeners()
method.
At the end, it initialise all the utility classes that it needs.
elmView
- the EventLogsManagerView
object that represents the ViewelmModel
- the EventLogsManagerModel
object that represents the ModelEventLogsManagerView
,
EventLogsManagerModel
public EventLogsManagerView getView()
EventLogsManagerView
elmView
element.elmView
component representing the View managed by this Controller.public EventLogsManagerModel getModel()
EventLogsManagerModel
elmModel
element.elmModel
component representing the Model managed by this Controller.public EditorManager getEditorManager()
EditorManager
editorManager
element.editorManager
element representing the Editor Manager used by this Controller.public AnalysisManager getAnalysisManager()
AnalysisManager
analysisManager
element.analysisManager
element representing the Analysis Manager used by this Controller.private void setStandardListeners()
private void newEventLog()
EditorManager
newEventLog()
method.EventLogEditor
,
EditorManager
private void openEventLog(java.lang.String selectedFileName)
EditorManager
to open an "Open" dialog to ask the user to select
which file to open and then to try to open it, using the
openEventLog(String)
method.selectedFileName
- the file name to set as selected in the dialog, null
for no selectionEventLogEditor
,
EditorManager
private boolean closeEventLog(javax.swing.JInternalFrame internalFrame)
JInternalFrame
passed as parameter, if one is passed,
or the selected one inside the
contentArea
,
if a frame is set as selected.
It uses the EditorManager
closeEventLog(JInternalFrame)
method.
internalFrame
- the internal frame to close, null
to close the selected internal frame inside the
contentArea
true
if the closing operation successfully close the internal frame, false
otherwiseJInternalFrame
,
EventLogEditor
,
EditorManager
private boolean saveEventLog()
EventLogEditor
editor inside the
contentArea
in its own file, if an editor is selected.
It uses the EditorManager
saveEventLog()
method.
EventLogEditor
,
EditorManager
private boolean saveAsEventLog(java.lang.String selectedFileName)
EventLogEditor
editor inside the
contentArea
,
then it tries to save the content in the selected file.
It uses the EditorManager
saveAsEventLog(String)
method.
selectedFileName
- the file name to set as selected in the dialog, null
for using the EventLogEditor
titleEventLogEditor
,
EditorManager
private boolean exportEventLog()
EditorManager
exportEventLog()
method.private boolean validateEventLog()
EventLogEditor
editor inside the
contentArea
,
checking if its content respects the XES Schema and therefore is a valid XES document.
It uses the AnalysisManager
validateEventLog()
method.EventLogEditor
,
AnalysisManager
private void createEventLogFootprint()
public void newEventLogEditor(java.lang.String editorTitle, java.lang.String editorContent, java.lang.String associatedFilePath, boolean isModified)
EventLogEditor
internal frame inside the
contentArea
,
then adds a new FooterAreaButton
button inside the
footerArea
,
both with the same title.
After that, set the listeners to these two components to implement their connection and functionalities.
At the end, set the content and an associated file to the EventLogEditor
,
if these two passed parameters are not null
.
editorTitle
- the title of the editor, null
for an auto-generated default titleeditorContent
- the content of the editor, null
for an empty editorassociatedFilePath
- the absolute path of the file associated with this editor,
null
when the editor does not have yet an associated fileisModified
- if the editor has to be set as modified or notEventLogEditor
,
FooterAreaButton
public void newInternalFrame(java.lang.String frameTitle, java.awt.Component frameContent)
JInternalFrame
object inside the
contentArea
,
then adds a new FooterAreaButton
button inside the
footerArea
,
both with the same title.
After that, set the listeners to these two components to implement their connection and functionalities.
At the end, set the content to the JInternalFrame
if not null
.
frameTitle
- the title of the internal frame, null
for an auto-generated default titleframeContent
- the Component
object to add inside the internal frameJInternalFrame
,
FooterAreaButton
public javax.swing.JInternalFrame findJInternalFrame(java.lang.String targetID)
JInternalFrame
inside the
contentArea
using its title, returning it or null
otherwise.targetID
- the identifier of the target internal frame to findJInternalFrame
if the method finds it, null
otherwiseJInternalFrame
public void modifyJInternalFrameTitles(javax.swing.JInternalFrame targetInternalFrame, java.lang.String newTitle)
newTitle
passed as parameter
and then updates all its references in the associated FooterAreaButton
to keep
the integrity and the association between them.targetInternalFrame
- the target internal frame to setnewTitle
- the new title of the target internal frame and its associated components on the applicationFooterAreaButton
,
JInternalFrame
public FooterAreaButton findFooterAreaButton(javax.swing.JInternalFrame target)
FooterAreaButton
button of the target
JInternalFrame
, returning it or null
otherwise.target
- the JInternalFrame
associated with the button to findFooterAreaButton
button associated to the target JInternalFrame
, null
otherwise.JInternalFrame